package com.dlc.shop.mp.common.service.impl;

import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.dlc.shop.mp.common.dao.WeixinKeywordresponseMapper;
import com.dlc.shop.mp.common.model.WeixinKeywordresponse;
import com.dlc.shop.mp.common.service.WeixinKeywordresponseService;
import lombok.AllArgsConstructor;
import org.springframework.cache.annotation.CacheEvict;
import org.springframework.cache.annotation.Cacheable;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 *
 * @author lgh on 2019/01/18.
 */
@Service
@AllArgsConstructor
public class WeixinKeywordresponseServiceImpl extends ServiceImpl<WeixinKeywordresponseMapper,WeixinKeywordresponse> implements WeixinKeywordresponseService {

    private final WeixinKeywordresponseMapper weixinKeywordresponseMapper;

    @Override
    @Cacheable(cacheNames="WeixinKeywordresponseList",key="1")
    public List<WeixinKeywordresponse> listWeixinKeywordresponse() {
        return weixinKeywordresponseMapper.selectList(Wrappers.emptyWrapper());
    }

    @Override
    @CacheEvict(cacheNames="WeixinKeywordresponseList",key="1")
    public void removeWeixinKeywordresponseCache() {

    }
}
